<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			#div1:target>span {
				background-color: #f00;
			}
		</style>
	</head>
	<body>
		<div id="div1">
			<p>我是p标签</p>
			<span>我是span标签</span>
		</div>
		<a href="#div1">点击我</a>
	</body>
</html>